package com.xms.schema.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;
import java.util.List;
import java.util.UUID;

/**
 * <p>
 *
 * </p>
 *
 * @author migo
 * @since 2021-08-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Attribute extends Model {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_UUID)
    private UUID attributeid;

    private String attributetypename;

    private String name;

    private String localizedname;

    private Integer maxlength;

    private Double minvalue;

    private Double maxvalue;

    private Boolean isnullable;

    private Boolean iscustomfield;

    private UUID entityid;

    private String entityname;

    private String defaultvalue;

    private String dataformat;

    private Integer precision;

    private String displaystyle;

    private Boolean isrequired;

    private Boolean logenabled;

    private UUID referencedentityid;

    private UUID optionsetid;

    private Boolean iscustomizable;

    private LocalDateTime createdon;

    private UUID createdby;

    private Boolean authorizationenabled;

    private String description;

    private Boolean isprimaryfield;

    private String formulaexpression;

    private Integer valuetype;

    private UUID summaryentityid;

    private String summaryexpression;

    private String referencedentityname;

    @TableField(exist = false)
    private OptionSet optionset;
    @TableField(exist = false)
    private List<StringMap> picklists;
}
